<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绝对定位</title>
    <style type="text/css">
        .box1{
            background-color: red;
            height: 300px;
        }
        .box2{
            background-color: green;
            height: 100px;
            position: absolute;
            left: 50px;
            top: 20px;
        }
        .box3{
            background-color: blue;
            height: 300px;
        }
        .box{
            background-color: yellow;
        }
    </style>
</head>
<body>
<div class="box1"></div>
<div class="box">
    <div class="box2">12121212222</div>
</div>
<div class="box3"></div>
</body>
</html>